package com.example.designpattern.duckexample;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.example.designpattern.duckexample.behavior.impl.Squeak;
import com.example.designpattern.duckexample.behavior.impl.SwingFly;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		MallardDuck mallardDuck = new MallardDuck("Mallar Duck");
		mallardDuck.setFlyable(new SwingFly());
		mallardDuck.setQuackable(new Squeak());
		
		mallardDuck.performFly();
		mallardDuck.performQuack();
		
		//###########################################
		List<String> list = new ArrayList<String>();
		list.add("First");
		list.add("Second");
		list.add("Third");
		list.add("Fourth");
		// Print the list in console
		System.out.println(list);
		
		//###########################################
		// An array of String objects
		String[] array = new String[] { "First", "Second", "Third", "Fourth" };
		// Print the array using Arrays.toString()
		System.out.println(Arrays.toString(array));
	}

}
